import axios from 'axios'
export default {
	state: {
		companyUrl: '/api/company',
		loaded: false,
		company4: {},
		line1pie: {},
		line3pie: {},
		top3top: {},
		persort: {}

	},
	mutations: {
		loadNews(state) {}
	},
	actions: {
		loadData({
			commit, state
		}, url) {
			axios({
					method: 'get',
					url: url
				})
				.then((res) => {
					if (res.status == 200) {
						state.loaded = true;
						let data = res.data.company;
						let company4 = data.company4.result;

						var top3 = {
							"园区注册企业": company4['BUS00005I'][0].totalEnterpriseNumber,
							"投资带动企业":company4.INV00001I[0].investDriveEnterpriseNum,
							"周边带动企业":company4.BUS00005O[0].totalEnterpriseNumber
						}
						state.top3top = top3;








						state.company4 = data.company4.result;

						state.persort = state.company4.BUS20004O[0];

						let top3 =





						 state.line1pie = data.company7.result.BUS00022I[0];

						 state.line3pie = data.company7.result.BUS00016I[0];






					// // 	state.topData = datas.company.result;
					// // } else {
					// // 	console.log('error')
					}
					commit('loadNews')
				})
		}
	}
}
